package com.example.demo.controller;


import com.example.demo.entity.ApiTestCaseGroupResult;
import com.example.demo.entity.ResponseInfo;
import com.example.demo.service.ApiTestCaseGroupResultService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/apiTestCaseGroupResult")
@Api(value = "/apiRequestResult", tags = "测试用例集结果管理")
public class ApiTestCaseGroupResultController {

    @Resource
    ApiTestCaseGroupResultService apiTestCaseGroupResultService;


    @GetMapping("/list")
    @ApiOperation(value = "测试用例集结果列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "planLogId", value = "日志id", required = true, dataType = "int"),
            @ApiImplicitParam(name = "testCaseGroupId", value = "测试用例集id", required = true, dataType = "int")
    })
    public ResponseInfo<List<ApiTestCaseGroupResult>> getList(@RequestParam int planLogId, @RequestParam int testCaseGroupId) {
        return ResponseInfo.successInfo(apiTestCaseGroupResultService.getList(planLogId, testCaseGroupId));
    }
}
